{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "环境要求；nvidia v100 32G"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    },
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "# 环境安装\n",
    "!git clone https://github.com/PaddlePaddle/PaddleMIX\n",
    "!cd PaddleMIX/ppdiffusers\n",
    "!pip install -r requirements.txt --user\n",
    "!python setup.py install"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    },
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "# 运行文生图\n",
    "!python examples/inference/text_to_image_generation-stable_diffusion_3.py"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "效果图：\n",
    "\n",
    "![](https://ai-studio-static-online.cdn.bcebos.com/3e157b7794684365b4e4dc077ede8b6d2b3c502dd6294d48b8c93b25cb36276f)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    },
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "# 图生图\n",
    "!python examples/inference/image_to_image_text_guided_generation-stable_diffusion_3.py"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "效果图：\n",
    "\n",
    "![](https://ai-studio-static-online.cdn.bcebos.com/ed6ed74b0f114a6dae22c2e0fd6d337aca2165907b2d402d83e17fffd042813c)\n",
    "\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "py35-paddle1.2.0"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
